LIBPATH = lib
INCPATH = include

CFLAGS = -Dlinux32 -Wall -fpic -g3 -I$(INCPATH) `pkg-config --cflags playercore`
LDFLAGS += -Wl,-rpath,$(LIBPATH) -L$(LIBPATH) -lxtimer -lrobotinocom -lxthread -lpthread
CC = g++
OBJ = robotino_driver.o

TARGET = librobotinodriver.so

all: $(TARGET)

clean:
	rm -f *.o *.so.0

$(TARGET): $(OBJ)
	$(CC) $? -shared -o $@ $(LDFLAGS)

%.o: %.cc
	$(CC) $(CFLAGS) -c $? -o $@
